package com.atguigu.behavior.interpretor;

import java.util.HashMap;

//加法运算符解析器
public class AddExpression extends OperatorExpression {
    AddExpression(Expression varLeft, Expression varRight) {
        super(varLeft, varRight);
    }
    
    @Override
    public int interpreter(HashMap<String, Integer> var) {
        return super.varLeft.interpreter(var) + super.varRight.interpreter(var); 
    }
    
}
